package com.learn.jdk;

import java.util.function.Function;

/**
 * Copyright: Copyright (c) 2019 Asiainfo
 *
 * @ClassName: com.learn.jdk.FunctionTest
 * @Description: 该类的功能描述
 * @version: v1.0.0
 * @author: lipan
 * @date: 2019/10/20 15:28
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ------------------------------------------------------------
 * 2019/10/20      lipan          v1.0.0               修改原因
 */

public class FunctionTest {

    //Funaction接口
    public static void main(String[] args) {

        //String代表toUpperCase的调用者
//        Function<String,String> func=String::toUpperCase;
//        System.out.println(func.getClass().getInterfaces()[0]);


        System.out.println(tt(10, num -> Math.abs(num)));

    }

      public  static   Integer tt (int a,Function<Integer,Integer> fuc){
           int ret;
           ret=fuc.apply(a);
           return  ret;
    }


}
